define(['app'], function(app) {
	'use strict';

	var controller = function controller($scope,Distributor_blacklist,$stateParams,$timeout,GoDialog) {
     	$scope.id = $stateParams.id;
     $scope.init_data = function(){
     	Distributor_blacklist.black_list(function(data){
     		$scope.datas = data;
     		console.log($scope.datas);
//   		$timeout(function() {
//					Swiper('.swiper-container', {
//						slidesPerView: 3,
//						spaceBetween: 0,
//						freeMode: true
//					});
//				}, 300);
     	})
     }
     $scope.init_data();
     $scope.cancle_button = function(store_id){
     	Distributor_blacklist.cancle(store_id,function(data){
     		if(data.success==true){
     			GoDialog.toast("取消成功");
     			$scope.init_data();
     		}else
     		GoDialog.toast("取消失败");
     	})
     }
	}

	controller.$inject = ['$scope', 'Distributor_blacklist','$stateParams','$timeout','GoDialog'];
	
	return app.registerController("distributor_blacklistctrl",controller);
});